/**
 * Shields for ships
 */

package edu.gatech.spacetraderteam3.model;

/**
 * Shield Ship Part
 * 
 * @author randal
 * @version 0.1
 */
public class ShipShield {

    /**
     * An array of strings that show the types of shields
     */
    private static final String[] SHIELDTYPES = new String[] { "No Shield",
            "Basic Electron Shield", "Basic Electron Shield Mk II",
            "Basic Electron Shield Mk III", "Plasma Shield", "Dense Plasma Shield",
            "Heavy Plasma Shield", "Distortion Field", "Quantum Field",
            "Space-Time Distortion Barrier" };

    /**
     * Gets the name of the shield module for a current level
     * 
     * @param level
     *            Level to check for the name
     * @return name of the shield
     */
    public static String getShieldName(int level) {
        return SHIELDTYPES[Math.max(0, Math.min(level, SHIELDTYPES.length - 1))];
    }

    /**
     * Gets the max level for shield upgrades
     * 
     * @return the max level
     */
    public static int getMaxLevel() {
        return SHIELDTYPES.length - 1;
    }

    /**
     * The ShipShield class's string representation. You should never see this.
     * @return A brief warning.
     */
    public String toString() {
        return "ShipShield! You shouldn't be seeing this...";
    }

}
